Parametrizacija površi

Jednograni hiperboloid

kanonska jednačina

hiperboloid[a_, b_, c_][x_,y_,z_]:=x^2/a^2+y^2/b^2-z^2/c^2;

ContourPlot3D[hiperboloid[2,2,3][x,y,z]==1,{x,-5,5},{y,-5,5},{z,-7,7}, Boxed->False, Axes->False,ColorFunction->"BeachColors"]

parametarska jednačina

hiperboloid[a_, b_, c_][ϕ_, t_]:={a Cos[ϕ] Cosh[t], b Sin[ϕ] Cosh[t],c Sinh[t]};

 ParametricPlot3D[hiperboloid[2,2,3][ϕ, t], {ϕ, 0, 2 π}, {t, -1.5,1.5}, Boxed->False, Axes->False, PlotStyle->Orange]

Zadatak 1: 
Naći parametrizaciju jednogranog hiperboloida koristeći prave linije.

Dvograni hiperboloid

kanonska jednačina

hiperboloid2[a_, b_, c_][x_,y_,z_]:=x^2/a^2-y^2/b^2-z^2/c^2;

ContourPlot3D[hiperboloid2[1,2,3][x,y,z]==1,{x,-2.5,2.5},{y,-5,5},{z,-9,9}, Boxed->False, Axes->False,ContourStyle->Green,Mesh->None]

parametarska jednačina

gore[a_, b_, c_][ϕ_, t_]:={a Cos[ϕ] Sinh[t], b Sin[ϕ] Sinh[t],c Cosh[t]};
dole[a_, b_, c_][ϕ_, t_]:={a Cos[ϕ] Sinh[t], b Sin[ϕ] Sinh[t],-c Cosh[t]};
hiperboloid2[a_, b_, c_][ϕ_, t_]:={gore[a,b,c][ϕ, t],dole[a,b,c][ϕ, t]};

 ParametricPlot3D[hiperboloid2[1,2,3][ϕ, t], {ϕ, 0, 2 π}, {t, -2.0,2.0}, Boxed->False, Axes->False, ColorFunction->ColorData["BrightBands"]]

Cilindri

eliptički cilindar

cilindarE[a_,b_][ϕ_, z_]:= {a Cos[ϕ], b Sin[ϕ], z};

ParametricPlot3D[cilindarE[2,1][ϕ, z], {ϕ, 0, 2 π}, {z, 0,4}, PlotRange->{{-3, 3}, {-1,1}, {0,5}}, Boxed->False, Axes->False,Mesh->None,PlotStyle->{Darker[Green,0.35],Opacity[0.5]}]

hiperbolički cilindar

levo[a_, b_][ϕ_, z_]:={a  Sinh[ϕ], b Cosh[ϕ],z};
desno[a_, b_][ϕ_, z_]:={a  Sinh[ϕ], -b Cosh[ϕ],z};
cilindarH[a_, b_][ϕ_, z_]:={levo[a,b][ϕ, z],desno[a,b][ϕ, z]};

 ParametricPlot3D[cilindarH[0.25,0.8][ϕ,z], {ϕ, -1.5, 1.5}, {z, 0.0,2.0},PlotStyle->{Green,Specularity[White,4]}]

Konus

konus[a_, b_][ϕ_, z_]:={a z Cos[ϕ], b z Sin[ϕ], z};

ParametricPlot3D[konus[1/2,3/2][ϕ, z], {ϕ, -π, π}, {z,-2.5,2.5},Axes->False, Boxed->False,ViewPoint->{1.658, -2.651, 1.294},PlotStyle->Directive[Red,Specularity[White,10]]]

Zadatak 2: 
Predstaviti konusne preseke.

Paraboloidi

eliptički paraboloid

paraboloid[p_, q_][x_,  y_]:={x, y , x^2/(2p) + y^2 /(2 q)};

ParametricPlot3D[paraboloid[1/2,1/2][x, y], {x, -2.5, 2.5}, {y,-2.5,2.5},Axes->False, Boxed->False, PlotRange->{{-2,2}, {-2,2} ,{0, 4}},ColorFunction->Function[{x,y},Hue[Rescale[Arg[Sin[2I x-x^2]],{-π,π}]]],ColorFunctionScaling->True]

hiperbolički paraboloid

sedlo[p_, q_][x_,  y_]:={x, y , x^2/(2p) - y^2 /(2 q)}

ParametricPlot3D[sedlo[1/2,1/2][x, y], {x, -2, 2}, {y,-2,2},Axes->False, Boxed->False,ColorFunction->Function[{x,y},Hue[Rescale[Arg[Sin[2I x-x^2]],{-π,π}]]],ColorFunctionScaling->False]

Zadatak 3: 
Naći parametrizaciju hiperboličkog paraboloida koristeći prave linije.

Mebijusova traka

mebijus[a_][u_,v_]:=a{Cos[u]+v Cos[u/2] Cos[u],Sin[u]+v Cos[u/2] Sin[u],v Sin[u/2]};

ParametricPlot3D[mebijus[1][u,v],{u,0,2π},{v,-0.3,0.3},PlotPoints->{40,5},Axes->None,Boxed->False,PlotStyle->FaceForm[Green,Red]]

Torus

torus[a_,b_,c_][u_,v_]:={(a+b Cos[v])Cos[u],(a+b Cos[v])Sin[u],c Sin[v]};

ParametricPlot3D[torus[8,4,5][u,v],{u,0,2π},{v,0,2π},PlotPoints->{35,50},Axes->None,Boxed->False]

Zadatak 4: 
Napraviti animaciju koja prikazuje kako nastaje torus rotacijom kruga oko neke ose.